<template>
	<view>
		<view class="list">
			<view v-for="(list,listindex) in listData.data" :key="listindex" class="listshow">
				<image :src="list.cover" mode="heightFix"></image>
				<text class="title">{{list.title}}</text>
				<view>{{list.desc}}</view>
				<p-price>{{list.pprice}}<text class="old">原价:{{list.oprice}}</text></p-price>
			</view>
		</view>
	</view>
</template>

<script>
	import pPrice from '../p-price/p-price.vue'
	export default {
		name: "common-list",
		data() {
			return {

			};
		},
		components: {
			pPrice
		},
		props: {
			listData: {
				type: Object
			}
		}
	}
</script>

<style scoped>
	.list {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		/* text-indent: 10rpx; */
	}

	.list .listshow {
		width: 50%;
		margin: 10rpx 0;
	}

	.list .listshow image {
		max-width: 100%;
		display: block;
		margin: 0 auto;
	}

	.list .listshow view {
		white-space: normal;
		word-break: break-all;
		word-warp: break-word;
		font-size: 28rpx;
	}

	.list .listshow .title {
		display: inline-block;
		/* padding:16rpx 0 10rpx 0; */
		font-size: 32rpx;
		font-weight: 700;
	}

	.old {
		color: #999;
		font-weight: 100;
		font-size: 20rpx;
		text-decoration: line-through;
	}
</style>
